package hbnu.config;

@Component
@Aspect //此注解表明当前类为切面类
public class LogRecord {


    @Before("excution(* com.hbnu.service.CartService.*(..))")
        public void beforeAddCart () {

            System.out.println("前置通知：在被增强方法（目标方法）之前执行....");

    }
    @Around("excution(* com.hbnu.service.CartService.*(..))")
    public void arroundAddCart (ProceedingJoinPoint proceedingJoinPointonpoint) {
        System.out.println("环绕通知：在被增强方法（目标方法）之前执行....");

        proceedingJoinPointonpoint.proceed();

        System.out.println("环绕通知：在被增强方法（目标方法）之后执行....");
    }
}